{{>partial_header}}
using System;
using System.IO;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Reflection;
using NUnit.Framework;

using {{packageName}}.Client;
using {{packageName}}.{{apiPackage}};
{{#hasImport}}
// uncomment below to import models
//using {{packageName}}.{{modelPackage}};
{{/hasImport}}

namespace {{packageName}}.Test.Api
{
    /// <summary>
    ///  Class for testing {{classname}}
    /// </summary>
    /// <remarks>
    /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
    /// Please update the test case below to test the API endpoint.
    /// </remarks>
    public class {{classname}}Tests : IDisposable
    {
        {{^nonPublicApi}}
        private {{classname}} instance;

        {{/nonPublicApi}}
        public {{classname}}Tests()
        {
            {{^nonPublicApi}}
            instance = new {{classname}}();
            {{/nonPublicApi}}
        }

        public void Dispose()
        {
            // Cleanup when everything is done.
        }

        /// <summary>
        /// Test an instance of {{classname}}
        /// </summary>
        [Test]
        public void {{operationId}}InstanceTest()
        {
            // TODO uncomment below to test 'IsType' {{classname}}
            //Assert.IsType<{{classname}}>(instance);
        }
        {{#operations}}
        {{#operation}}

        /// <summary>
        /// Test {{operationId}}
        /// </summary>
        [Test]
        public void {{operationId}}Test()
        {
            // TODO uncomment below to test the method and replace null with proper value
            {{#allParams}}
            //{{{dataType}}} {{paramName}} = null;
            {{/allParams}}
            //{{#returnType}}var response = {{/returnType}}instance.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
            {{#returnType}}
            //Assert.IsType<{{{.}}}>(response);
            {{/returnType}}
        }
        {{/operation}}
        {{/operations}}
    }
}
